package com.codeplay.domain.repository;

import com.codeplay.domain.entity.CreatorUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface CreatorUserRepository extends JpaRepository<CreatorUser, Long> {
    Optional<CreatorUser> findByUsername(String username);
    Optional<CreatorUser> findByEmail(String email);
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    Page<CreatorUser> findByVerifiedTrue(Pageable pageable);
    Page<CreatorUser> findByLevelGreaterThanEqual(Integer level, Pageable pageable);
} 